<header class="navbar-fixed-top">
    <nav class="container">
        <div class="row">
             <div class="logo">
                <a href="{:C('LOCAL_DOMAIN')}" title="LOGO">
                    <img src="__ASSET__/Home/v4/src/images/logo.png" alt="logo">
                </a>
            </div>
            <div class="logo2">
                <a href="{:C('LOCAL_DOMAIN')}" title="LOGO">
                    <img src="__ASSET__/Home/v4/src/images/logo2.png" alt="logo">
                </a>
            </div>
            <div class="col-xs-4 col-sm-4 col-md-4 col-lg-4">
                    <ul class="nav navbar-nav pull-left">
                        <li class="JS-home">
                            <a href="{:C('LOCAL_DOMAIN')}/trends" title="主页">
                                <i class="home"></i>
                                <div class="span">主页</div>
                            </a>
                        </li>
                        <li class="JS-find">
                            <a href="{:C('LOCAL_DOMAIN')}/explore" title="探索">
                                <i class="find"></i>
                                <div class="span">探索</div>
                            </a>
                        </li>
                        <li class="JS-match relative">
                            <a href="{:C('LOCAL_DOMAIN')}/match" title="赛事">
                                <i class="match"></i>
                                <div class="span">赛事</div>
                            </a>
                            <ul class="info-hide JS_match_popup font_micro black02-bg">
                                <volist name="match_games" id="_game">
                                <li>
                                    <a href="{:C('LOCAL_DOMAIN')}/match-game-{$_game.id}" title="{$_game.name}">{$_game.name}</a>
                                </li>
                                </volist>
                            </ul>
                        </li>
                        <!-- <li class="JS-team">
                            <a href="/team" title="战队">
                                <i class="team_icon"></i>
                                <div class="span">战队</div>
                            </a>
                        </li> -->
                    </ul>
            </div>
            <div class="header-input col-xs-3 col-sm-3 col-md-3 col-lg-4">
                <div class="input input-group input-group-nav input-group-nav-1 relative">
                    <input type="text" class="form-control font14 JS_header_search_input"  name="key" placeholder="试试搜点儿什么..." title="试试搜点儿什么...">
                    <span class="input-group-btn input-group-btn-search" >
                       <a role="button" class="search btn JS_header_search" aria-label="Left Align">
                           <span class="glyphicon glyphicon-search" aria-hidden="true"></span>
                       </a>
                   </span>
                </div>
            </div>
            <div class="col-xs-3 col-sm-3 col-md-3 col-lg-3 right">
                <ul class="nav navbar-nav pull-right header_right">
                    <li>
                        <a href="{:C('LOCAL_DOMAIN')}/download" title="下载">
                            <i class="download-img"></i>
                            <div class="span">下载</div>
                        </a>
                    </li>
                    <notempty name="userInfo">
                        <li class="info-btn relative">
                            <a href="javascript:;" title="{$userInfo.nickname}" class="info-btna">
                                <i class="person-img"></i>
                                <div class="span textoverflow">{$userInfo.nickname}</div>
                            </a>
                            <ul class="info-hide JS_popup black02-bg font_micro">
                                <li title="我的动态"><a href="{:C('LOCAL_DOMAIN')}/user-{$Think.const.UID}">我的动态</a></li>
                                <li onclick="warning()" title="与我相关"><a href="javascript:void(0);">与我相关</a></li>
                                <li title="我的收藏"><a href="{:C('LOCAL_DOMAIN')}/favour-video">我的收藏</a></li>
                                <li class="JS_logout" title="退出登录"><a href="javascript:void(0);">退出登录</a></li>
                            </ul>
                        </li>
                    <else />
                        <li class="login-btn" onclick="loginShow();">
                            <a href="javascript:;" title="登录">
                                <i class="login-img"></i>
                                <div class="span">登录</div>
                            </a>
                        </li>
                        <li class="register-btn" onclick="registerShow();">
                            <a href="javascript:;" title="注册">
                                <i class="person-img"></i>
                                <div class="span">注册</div>
                            </a>
                        </li>
                    </notempty>
                </ul>
            </div>
        </div>
    </nav>
</header>
<script type="text/javascript">
    $(function(){
        $('.JS_logout').click(function(){
            $.post('{:C('LOCAL_DOMAIN')}/logout',{}, function(){
                location.reload();
            });
        });

        $(".info-btna").click(function(){
            $(".JS_popup").fadeToggle();
            return false;
        });
        $(document).click(function(){
            $(".JS_popup").fadeOut();
        });

        var currentTab = "{$currentTab}";
        if (currentTab != '') {
            $('.JS-'+currentTab).addClass('active');
        }
        $('.JS_header_search').click(function(){
            var str = $('.JS_header_search_input').val();
            if (str.length > 0) {
                location.href = "{:C('LOCAL_DOMAIN')}/search?keywords="+str;
            }else{
                $('.JS_header_search_input').focus();
            }
        });
        $(".JS_header_search_input").keydown(function (e){
            if(e.which == "13"){
                $('.JS_header_search').click();
            }
        });
    });
    function warning() {
        layer.alert('功能暂未开通');
    }
    window._SELF = {$userInfo|json_encode};
</script>